﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DSS_XNA.Engine.Error;
using DSS_XNA;

namespace DSS_XNA.Engine.Script.Commands
{
    public static class ScriptCommand_LoadScript
    {
        #region Static Methods

        public static void Action(Dictionary<string, string> args, ScriptManager manager, Game1 engine)
        {
            if (!args.ContainsKey("name"))
                throw new DSSException("No Name parameter for LoadScript");

            string name = manager.GetParameterValue(args["name"]).ToString();
            string path = String.Format("scripts\\{0}.spt", name);

            manager.LoadScriptRequest(path);
        }

        #endregion
    }
}
